#!/bin/bash
cd $(dirname $(readlink -f "$0"))
url=http://172.16.98.140:8088/gateway/toOldTime.txt

now=`cat toOldTime.txt`
latest=`curl "$url"`

if [[ "co$now" != "co$latest" ]]; then
	./upgateway.old.sh
	echo "$latest" > toOldTime.txt
	echo "update to old version done"
fi
